<template>
  <div id="account">
    <el-menu :default-active="$route.path"
             class="el-menu-demo"
             mode="horizontal">
      <el-menu-item v-for="(item,index) in tab"
                    :index="item.path"
                    @click="handleSelect(item.path)"
                    :key="index">{{item.title}}
      </el-menu-item>
    </el-menu>
    <div class="line"></div>
      <router-view/>

  </div>
</template>

<script>
  export default {
    name: "Account",
    data() {
      return {
        tab:[
          {title:'账户信息',path:'/buyer/account/company'},
          {title:'换绑手机',path:'/buyer/account/changePhone'},
          {title:'修改密码',path:'/buyer/account/changePassword'},
        ]
      };
    },
    methods: {
      handleSelect(path) {
         this.$router.push(path)
      }
    }
  }
</script>

<style scoped>

</style>